package com.fjzx.androidframe.network.callback;

/**
 * 文件下载事件监听
 */
public interface DownloadProgressListener {
    void onProgress(long size, long total);

    void onSuccess(String result);

    void onError(Exception e);

    /**
     * 抽象一个简单的监听，只需要实现onSuccess
     */
    abstract class SimpleDownloadProgressListener implements DownloadProgressListener {
        @Override
        public void onProgress(long size, long total) {}
        @Override
        public void onError(Exception e) {}
    }
}
